<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <title>ActiveBudget - Open Source Cash Flow on Rails</title>
  <%= javascript_include_tag :defaults %>
  <%= javascript_include_tag 'redbox', 'FusionCharts' %>
  <%= stylesheet_link_tag 'activebudget', 'redbox' %>
</head>

<body>
  <div id="Header">
    <div class="fixed_width">
      <%- if logged_in? -%>
        <dl class="breakout">
          <dt>Week</dt>
          <dd><%= color_money current_user.total_this_week %></dd>

          <dt><%= @week.last.strftime('%B')%></dt> 
          <dd><%= color_money current_user.total_this_month %></dd>

          <dt><%= @week.last.year %></dt>
          <dd><%= color_money current_user.total_this_year %></dd>
        </dl>
      <%- end -%>
      
      <%= link_to image_tag('activebudget_logo_small.png', :id=>:Logo), welcome_path %>
    </div>
  </div>
  
  <ul id="Navigation">
    <li class="first"><%= link_to 'Register', register_path %></li>
    <li><%= link_to 'Jobs', jobs_path %></li>
    <li><%= link_to 'Recurring', recurrings_path %></li>
		<li class="manage"><%= link_to 'Log Out', logout_path %></li>
		<li class="manage"><%= link_to 'Settings', edit_user_path(current_user) %></li>
  </ul>
  
  	
	<div id="Content" class="clearfix">
		<%= yield %>
	</div>
		
	<div id="Footer">
    ActiveBudget is available under the <%= link_to 'MIT license', 'http://www.opensource.org/licenses/mit-license.php' %> and managed by <%= link_to 'Corkboard', 'http://corkboardinc.com' %>
  </div>

	<!-- Google Analytics -->
	<% if ENV['RAILS_ENV'] == 'production' -%>
		<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
		<script type="text/javascript">
			_uacct = "UA-1143202-3";
			urchinTracker();
		</script>
	<% end -%>
  
</body>
</html>
  